package com.hrt.demo.czd.bean;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@Entity
@Table(name = "ADRESS_INFO")
@JsonIgnoreProperties(value = { "user_enti"})
public class Address implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ADDRESSID", nullable = false)
	private Long id;//地址id
	@Column(name = "ADDRESSID_NAME")
	private String name;//地址名
	/**
	 * 0未删除 1已删除
	 * 
	 */
	@Column(name = "isdelete")
	private Integer isdelete = 0; 
	
	@ManyToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE }, optional = false)
	@JoinColumn(name = "USER_ID")
	private User user_enti;//用户
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public User getUser_enti() {
		return user_enti;
	}
	public void setUser_enti(User user_enti) {
		this.user_enti = user_enti;
	}
	public Integer getIsdelete() {
		return isdelete;
	}
	public void setIsdelete(Integer isdelete) {
		this.isdelete = isdelete;
	}
}
